package com.sandama.bbs.activity;

import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.webkit.WebView;
import butterknife.Bind;
import butterknife.ButterKnife;
import com.sandama.bbs.R;

/**
 * Author:TongxiJi
 * E-MAIL:694270875@qq.com
 * Function:
 * Create Date:十月11,2015
 */
public class WebActivity extends AppCompatActivity {
    public static final String TAG = "WebActivity";
    @Bind(R.id.wv_main)
    WebView wvMain;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web);
        ButterKnife.bind(this);
        Uri uri = getIntent().getData();
        String url = uri.toString().replace(getString(R.string.my_web_custom_scheme), "http");
//        Log.i(TAG, "url:" + url);
        wvMain.loadUrl(url);
    }
}
